package com.yisoo.ubag.iot.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yisoo.common.to.CheckDeviceIsOpenTo;
import com.yisoo.common.to.DevSimpleDataTo;
import com.yisoo.common.utils.PageUtils;
import com.yisoo.common.utils.R;
import com.yisoo.ubag.iot.entity.DeviceEntity;
import com.yisoo.ubag.iot.vo.DeviceStatusMqttContentVo;

import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @author mmciel
 * @email 761998179@qq.com
 * @date 2021-02-09 23:43:58
 */
public interface DeviceService extends IService<DeviceEntity> {

    PageUtils queryPage(Map<String, Object> params);

    R batchAdd(Long cid, List<DevSimpleDataTo> datas);

    R reload(Long cid);

    R updateStatus(Long cid);

    R detail(Long did);

    void updateOne(DeviceStatusMqttContentVo content);

    DeviceEntity getDev(String productKey,String devName);


    DeviceEntity getDevByName(String devName);



//    R openBoxTest(String devSecret);

    CheckDeviceIsOpenTo check(String devSecret);

    DeviceEntity getDevBySecret(String devSecret);

    R open(String bagId);
    R close(String bagId);

    R testMapping(Long bagId, Integer control);
//    R testOpen(String bagId);
}

